<?php /* Smarty version 2.6.18, created on 2010-03-16 09:11:42
         compiled from addnewdispatchitem.tpl */ ?>
<table class="popup" border="0" cellspacing=0 cellpadding=0>
	<tr><td><div class="pop">
		<div class="top_pop"><img src="/app/default/www/images/top_left_pop.jpg" /></div> 
		<div id="drag_bar"><h2 class="pop_h2">&nbsp;New Dispatch Organism</h2></div>
		<div class="content">
			<table border="0" width="100%">
				<tr>
					<td>Organism</td>
					<td>Size</td>
					<td>Qty.</td>
				</tr>
				<tr><td colspan=5><hr></td></tr>
				<tr>
					<td ><select style="width:130px" name="user[organism]" onChange="getOrgAttribute(this.value);">
						<option value="">-- Select Organsim --</option>
						<?php $_from = $this->_tpl_vars['organisms']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['org']):
?>
							<option value="<?php echo $this->_tpl_vars['org']['org_organism_id']; ?>
"><?php echo $this->_tpl_vars['org']['name']; ?>
</option>
						<?php endforeach; endif; unset($_from); ?>
					</select></td>
					<td id="attribute">
						<select name="user[sizeage]" style="width:120px">
							<option value="">-- Select Size --</option>						
						</select>
					</td>
					<td><input type="text" name="user[qty]" value="0" style="width:40px"></td>
				</tr>
				<tr><td height="10"></td></tr>
				<tr>
					<td colspan="5" align="center"><input type="button" value="Close" onclick="popup('addItem');">&nbsp;<input type="button" value="Save" onclick="addOrganism();"></td>
				</tr>
			</table>
		</div>
		<div class="btm_pop"><img src="/app/default/www/images/btm_left_pop.jpg"  alt="" />
	</div></td></tr>
</table>
<script language="javascript">
<?php echo '
	function getOrgAttribute(org_organism_id){
		doajaxAction("/account/OrganismAttribute/org_organism_id/"+org_organism_id,0,\'attribute\');
	}
	
	function addOrganism(){
		popup(\'addItem\');
		doajaxAction("/account/saveNewDispatchItem/poid/'; ?>
<?php echo $this->_tpl_vars['poid']; ?>
<?php echo '/customerId/'; ?>
<?php echo $this->_tpl_vars['customerId']; ?>
<?php echo '",1,\'detail\',document.getElementById(\'mainForm\'));
		
	}

'; ?>

</script>
		